#include<bits/stdc++.h>
#define int long long
#define endl "\n"

using namespace std;

signed main() {
	map<char, char>mp;
	mp['U'] = 'R';
	mp['D'] = 'L';
	mp['L'] = 'D';
	mp['R'] = 'U';
	char c;
	cin >> c;
	cout << mp[c] << endl;
	return 0;
}

